<link rel="stylesheet" href="/assets/assets(home)/css/collection.css">
<title>我的课程</title>


<!-- <header class="mui-bar mui-bar-nav mui-bar-nav-bg">
    <a id="icon-menu" class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <h1 class="mui-title">我的课程</h1>
</header> -->

<!-- <div class="tabs">
    <ul>
        <li class="active">全部</li>
        <li>Web前端</li>
        <li>后端</li>
        <li>设计</li>
        <li>海报</li>
    </ul>
</div> -->

{if condition='$list'}
<div class="list">
    {foreach $list as $item}
    {foreach $subject as $items}
    {if $items['id'] == $item['subid']}
    <div class="item">
        <div class="content">
            <a href="{:url('home/search/details')}?subid={$item.subid}">
                <div class="thumb">
                    <img src="{$item.subject.thumbs}" alt="">
                </div>
                <div class="info">
                    <div class="name">
                        <span>课程名称：</span>{$item.subject.title}
                    </div>
                    <div class="type">
                        <span>课程分类：</span>{$items.category.name}
                    </div>
                    <div class="teacher">
                        <span>授课老师：</span>{$items.teacher.name}
                    </div>
                </div>
            </a>
        </div>
    </div>
    {/if}
    {/foreach}
    {/foreach}
</div>
{/if}

<script>
    //修改浏览器自带的后退按钮
    window.history.pushState(null, null, ``);

    window.addEventListener('popstate', function (e) {
        e.preventDefault()
        location.href = `{:url('/home/business/center')}`
    }, false)
</script>